class Animal<T> {
    name:T;
    constructor(name: T){
        this.name = name;
    }
    action<T>(say:T) {
        console.log(say)
    }
}
let cat = new Animal('cat');
cat.action('mimi')
